package com.platform.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.platform.common.bean.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.validation.constraints.NotBlank;

/**
 * describe:系统用户组
 *
 * @author rainly
 * @date 2019/12/06
 * @time 2:47 下午
 */
@ApiModel(value = "系统用户组", description = "用户表 sys_user_group")
@Data
@TableName(value = "sys_user_group")
public class SysUserGroup extends BaseEntity<SysUserGroup> {

    @ApiModelProperty(value = "user_group_id", name = "user_group_id", example = "32位uuid", required = true)
    @Id
    @Column(name = "user_group_id", length = 32, columnDefinition = "varchar(32) COMMENT '主键'")
    @TableId(type = IdType.ASSIGN_ID)
    private String userGroupId;

    @ApiModelProperty(value = "用户组名称", name = "user_group_name", example = "用户组名称", required = true)
    @Column(name = "user_group_name", length = 50, columnDefinition = "varchar(50) COMMENT '用户组名称'")
    @NotBlank(message = "用户组名称不能为空")
    private String userGroupName;

    @ApiModelProperty(value = "父id", name = "parent_id", example = "父id", required = true)
    @Column(name = "parent_id", length = 32, columnDefinition = "varchar(32) COMMENT '父id'")
    @NotBlank(message = "父id不能为空")
    private String parentId;

    @ApiModelProperty(value = "父id集合", name = "parent_ids", example = "父id集合", required = true)
    @Column(name = "parent_ids", length = 200, columnDefinition = "varchar(200) COMMENT '父id集合'")
    private String parentIds;

    @ApiModelProperty(value = "描述", name = "info", example = "描述", required = true)
    @Column(name = "info", length = 100, columnDefinition = "varchar(100) COMMENT '描述'")
    private String info;

    @ApiModelProperty(value = "标记", name = "flag", example = "标记(diabale 删除 unable 正常)", required = true)
    @Column(name = "flag", length = 20, columnDefinition = "varchar(20) COMMENT '标记(diabale 删除 unable 正常)'")
    @TableField(fill = FieldFill.INSERT)
    private String flag;
}
